# This gives MQTT_AGENT_INCLUDE_PUBLIC_DIRS and MQTT_AGENT_SOURCES
include(${CMAKE_CURRENT_LIST_DIR}/coreMQTT-Agent/mqttAgentFilePaths.cmake)

set(COREMQTT_AGENT_PORT_INCLUDE_DIRS
    ${CMAKE_CURRENT_LIST_DIR}/port
)

set(COREMQTT_AGENT_INCLUDE_DIRS
    ${MQTT_AGENT_INCLUDE_PUBLIC_DIRS}
    ${COREMQTT_AGENT_PORT_INCLUDE_DIRS}
)

set(COREMQTT_AGENT_PORT_SRCS
    ${CMAKE_CURRENT_LIST_DIR}/port/freertos_agent_message.c
    ${CMAKE_CURRENT_LIST_DIR}/port/freertos_command_pool.c
)

set(COREMQTT_AGENT_SRCS
    ${MQTT_AGENT_SOURCES}
    ${COREMQTT_AGENT_PORT_SRCS}
)

set(COREMQTT_AGENT_REQUIRES
    coreMQTT
)

idf_component_register(
    SRCS
        ${COREMQTT_AGENT_SRCS}
    INCLUDE_DIRS
        ${COREMQTT_AGENT_INCLUDE_DIRS}
    REQUIRES
        ${COREMQTT_AGENT_REQUIRES}
)
